<script lang="ts" setup>
import type { HotByDay } from '@/types';
import type { PropType } from 'vue';
defineProps({
  good: {
    type: Object as PropType<HotByDay>,
    required: true,
  },
});
</script>

<template>
  <div class="item">
    <RouterLink :to="`/product/${good.id}`">
      <img :src="good.picture" alt="" />
      <p class="name ellipsis">{{ good.name }}</p>
      <p class="desc ellipsis">{{ good.desc }}</p>
      <p class="price">&yen;{{ good.price }}</p>
    </RouterLink>
  </div>
</template>
<style lang="less" scoped>
.item {
  padding: 20px 30px;
  text-align: center;
  width: 220px;
  // background: #f0f9f4;
  // .hoverShadow();
  img {
    width: 160px;
    height: 160px;
  }
  p {
    font-size: 16px;
    padding-top: 10px;
    text-align: center;
    &.desc {
      color: #999;
      font-size: 14px;
    }
  }
  .price {
    color: @priceColor;
  }
}
</style>
